Component org.nuxeo.elasticsearch.ElasticSearchComponent
In bundle org.nuxeo.elasticsearch.core
Implementation
Class:
org.nuxeo.elasticsearch.ElasticSearchComponent
Services
- org.nuxeo.elasticsearch.api.ElasticSearchIndexing
- org.nuxeo.elasticsearch.api.ElasticSearchAdmin
- org.nuxeo.elasticsearch.api.ElasticSearchService
Extension Points
XML Source
<?xml version="1.0"?>
<component name="org.nuxeo.elasticsearch.ElasticSearchComponent" version="1.0">
<require>org.nuxeo.ecm.core.repository.RepositoryServiceComponent</require>
<implementation class="org.nuxeo.elasticsearch.ElasticSearchComponent" />
<service>
<provide interface="org.nuxeo.elasticsearch.api.ElasticSearchService" />
<provide interface="org.nuxeo.elasticsearch.api.ElasticSearchIndexing" />
<provide interface="org.nuxeo.elasticsearch.api.ElasticSearchAdmin" />
</service>
<extension-point name="elasticSearchLocal">
<documentation>
Extension point used to setup an embedded Elasticsearch instance.
It creates a local node using the same JVM as Nuxeo.
This is a test configuration and must not be used in production,
it is limited to one shard and no replica.
<code>
<elasticSearchLocal
clusterName="MyCluster"
nodeName="MyNuxeo"
pathData="/var/lib/nuxeo/elasticsearch/"
indexStoreType="mmapfs"
httpEnabled="true"
/>
</code>
Please refer to the Elasticsearch node configuration
clusterName is the cluster.name
nodeName is the node.name, default to nuxeoNode
pathData is the path.data
indexStoreType is the index.store_type
httpEnabled is the node.enable_http
</documentation>
<object class="org.nuxeo.elasticsearch.config.ElasticSearchLocalConfig" />
</extension-point>
<extension-point name="elasticSearchRemote">
<documentation>
Extension point used to configure access to a remote Elasticsearch cluster.
This setup a TransportClient, clusterName and addressList are mandatory.
<code>
<elasticSearchRemote
clusterName="elasticsearch"
addressList="127.0.0.1:9300,myelasticsearch:9300"
clientTransportSniff="false"
clientTransportIgnoreClusterName="false"
clientTransportPingTimeout="5s"
clientTransportNodesSamplerInterval="5s"
/>
</code>
Please refer to the Elasticsearch documentation for the following options:
clusterName the cluster name to join
addressList a list of comma separated transport address, note that the default
elasticsearch TCP port is 9300 and not 9200 (which is the HTTP port).
clientTransportSniff see client.transport.sniff option
clientTransportIgnoreClusterName see client.transport.ignore_cluster_name
clientTransportPingTimeout see client.transport.ping_timeout
clientTransportNodesSamplerInterval see client.transport.nodes_sampler_interval
@see http://www.elasticsearch.org/guide/en/elasticsearch/client/java-api/current/client.html
</documentation>
<object class="org.nuxeo.elasticsearch.config.ElasticSearchRemoteConfig" />
</extension-point>
<extension-point name="elasticSearchIndex">
<documentation>
Extension point used to setup an Elasticsearch index.
The one used to index Nuxeo documents must be of type "doc".
<code>
<elasticSearchIndex name="nuxeo" type="doc" create="true">
<settings></settings>
<mapping></mapping>
<fetchFromSources>
<include>ecm:*</include>
<include>dc:*</include>
<exclude>ecm:binaryFulltext</exclude>
</fetchFromSources>
</elasticSearchIndex>
</code>
@Since 5.9.3
name is the Elasticsearch index name.
type is the Elasticsearch type that hold a mapping, "doc" is the mapping
for Nuxeo documents
create can be set to false if you don't want Nuxeo to initialize the index
and mapping.
settings the Elasticsearch settings
@see http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/index-modules.html
mapping the Elasticsearch mapping for the type
@see http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping.html
@Since 5.9.5
fetchFromSources, include a list of field name pattern that will be included
when fetching document from Elasticsearch (@see NxQueryBuilder.fetchFromElasticsearch)
use the exclude list to prevent returning fulltext or long fields.
</documentation>
<object class="org.nuxeo.elasticsearch.config.ElasticSearchIndexConfig" />
</extension-point>
</component>